<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
        }

        .box {
            width: 200px;
            height: 200px;
        }

        .box3 {
            display: table
        }

        .box1 {
            background-color: pink;
            margin-bottom: 20px;



        }

        .box2 {
            background-color: yellow;
            margin-top: 10px;

        }
    </style>
</head>

<body>
    <div class="box3">
        <div class="box1 box"></div>
    </div>
    <div class="box2 box"></div>
</body>

</html>